<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>TOC</title>
<!-- <link type="text/css" href="kf8.css" media="amzn-kf8" rel="Stylesheet"/> -->
<!-- <link type="text/css" href="mobi.css" media="amzn-mobi" rel="Stylesheet"/> -->
<!-- <link type="text/css" href="styles.css" rel="Stylesheet"/> -->
</head>
<body>

<h1 id="toc">Table of Contents</h1>

<ul>
    <li><a href="LangImpl01.html">1. Tutorial Introduction and the Lexer</a>
    <ul>
        <li><a href="LangImpl01.html#tutorial-introduction">Tutorial Introduction</a></li>
        <li><a href="LangImpl01.html#the-basic-language">The Basic Language</a></li>
        <li><a href="LangImpl01.html#the-lexer">The Lexer</a></li>
    </ul>
    </li>
    <li><a href="LangImpl02.html">2. Implementing a Parser and AST</a>
    <ul>
        <li><a href="LangImpl02.html#chapter-2-introduction">Chapter 2 Introduction</a></li>
        <li><a href="LangImpl02.html#the-abstract-syntax-tree-ast">The Abstract Syntax Tree (AST)</a></li>
        <li><a href="LangImpl02.html#parser-basics">Parser Basics</a></li>
        <li><a href="LangImpl02.html#basic-expression-parsing">Basic Expression Parsing</a></li>
        <li><a href="LangImpl02.html#binary-expression-parsing">Binary Expression Parsing</a></li>
        <li><a href="LangImpl02.html#parsing-the-rest">Parsing the Rest</a></li>
        <li><a href="LangImpl02.html#the-driver">The Driver</a></li>
        <li><a href="LangImpl02.html#conclusions">Conclusions</a></li>
        <li><a href="LangImpl02.html#full-code-listing">Full Code Listing</a></li>
    </ul>
    </li>
    <li><a href="LangImpl03.html">3. Code generation to LLVM IR</a>
    <ul>
        <li><a href="LangImpl03.html#chapter-3-introduction">Chapter 3 Introduction</a></li>
        <li><a href="LangImpl03.html#code-generation-setup">Code Generation Setup</a></li>
        <li><a href="LangImpl03.html#expression-code-generation">Expression Code Generation</a></li>
        <li><a href="LangImpl03.html#function-code-generation">Function Code Generation</a></li>
        <li><a href="LangImpl03.html#driver-changes-and-closing-thoughts">Driver Changes and Closing Thoughts</a></li>
        <li><a href="LangImpl03.html#full-code-listing">Full Code Listing</a></li>
    </ul>
    </li>
    <li><a href="LangImpl04.html">4. Adding JIT and Optimizer Support</a>
    <ul>
        <li><a href="LangImpl04.html#chapter-4-introduction">Chapter 4 Introduction</a></li>
        <li><a href="LangImpl04.html#trivial-constant-folding">Trivial Constant Folding</a></li>
        <li><a href="LangImpl04.html#llvm-optimization-passes">LLVM Optimization Passes</a></li>
        <li><a href="LangImpl04.html#adding-a-jit-compiler">Adding a JIT Compiler</a></li>
        <li><a href="LangImpl04.html#full-code-listing">Full Code Listing</a></li>
    </ul>
    </li>
    <li><a href="LangImpl05.html">5. Extending the Language: Control Flow</a>
    <ul>
        <li><a href="LangImpl05.html#chapter-5-introduction">Chapter 5 Introduction</a></li>
        <li><a href="LangImpl05.html#if-then-else">If/Then/Else</a>
        <ul>
            <li><a href="LangImpl05.html#lexer-extensions-for-if-then-else">Lexer Extensions for If/Then/Else</a></li>
            <li><a href="LangImpl05.html#ast-extensions-for-if-then-else">AST Extensions for If/Then/Else</a></li>
            <li><a href="LangImpl05.html#parser-extensions-for-if-then-else">Parser Extensions for If/Then/Else</a></li>
            <li><a href="LangImpl05.html#llvm-ir-for-if-then-else">LLVM IR for If/Then/Else</a></li>
            <li><a href="LangImpl05.html#code-generation-for-if-then-else">Code Generation for If/Then/Else</a></li>
        </ul>
        </li>
        <li><a href="LangImpl05.html#for-loop-expression">&#8216;for&#8217; Loop Expression</a>
        <ul>
            <li><a href="LangImpl05.html#lexer-extensions-for-the-for-loop">Lexer Extensions for the &#8216;for&#8217; Loop</a></li>
            <li><a href="LangImpl05.html#ast-extensions-for-the-for-loop">AST Extensions for the &#8216;for&#8217; Loop</a></li>
            <li><a href="LangImpl05.html#parser-extensions-for-the-for-loop">Parser Extensions for the &#8216;for&#8217; Loop</a></li>
            <li><a href="LangImpl05.html#llvm-ir-for-the-for-loop">LLVM IR for the &#8216;for&#8217; Loop</a></li>
            <li><a href="LangImpl05.html#code-generation-for-the-for-loop">Code Generation for the &#8216;for&#8217; Loop</a></li>
        </ul>
        </li>
        <li><a href="LangImpl05.html#full-code-listing">Full Code Listing</a></li>
    </ul>
    </li>
    <li><a href="LangImpl06.html">6. Extending the Language: User-defined Operators</a>
    <ul>
        <li><a href="LangImpl06.html#chapter-6-introduction">Chapter 6 Introduction</a></li>
        <li><a href="LangImpl06.html#user-defined-operators-the-idea">User-defined Operators: the Idea</a></li>
        <li><a href="LangImpl06.html#user-defined-binary-operators">User-defined Binary Operators</a></li>
        <li><a href="LangImpl06.html#user-defined-unary-operators">User-defined Unary Operators</a></li>
        <li><a href="LangImpl06.html#kicking-the-tires">Kicking the Tires</a></li>
        <li><a href="LangImpl06.html#full-code-listing">Full Code Listing</a></li>
    </ul>
    </li>
    <li><a href="LangImpl07.html">7. Extending the Language: Mutable Variables</a>
    <ul>
        <li><a href="LangImpl07.html#chapter-7-introduction">Chapter 7 Introduction</a></li>
        <li><a href="LangImpl07.html#why-is-this-a-hard-problem">Why is this a hard problem?</a></li>
        <li><a href="LangImpl07.html#memory-in-llvm">Memory in LLVM</a></li>
        <li><a href="LangImpl07.html#mutable-variables-in-kaleidoscope">Mutable Variables in Kaleidoscope</a></li>
        <li><a href="LangImpl07.html#adjusting-existing-variables-for-mutation">Adjusting Existing Variables for Mutation</a></li>
        <li><a href="LangImpl07.html#new-assignment-operator">New Assignment Operator</a></li>
        <li><a href="LangImpl07.html#user-defined-local-variables">User-defined Local Variables</a></li>
        <li><a href="LangImpl07.html#id1">Full Code Listing</a></li>
    </ul>
    </li>
    <li><a href="LangImpl08.html">8. Compiling to Object Code</a>
    <ul>
        <li><a href="LangImpl08.html#chapter-8-introduction">Chapter 8 Introduction</a></li>
        <li><a href="LangImpl08.html#choosing-a-target">Choosing a target</a></li>
        <li><a href="LangImpl08.html#target-machine">Target Machine</a></li>
        <li><a href="LangImpl08.html#configuring-the-module">Configuring the Module</a></li>
        <li><a href="LangImpl08.html#emit-object-code">Emit Object Code</a></li>
        <li><a href="LangImpl08.html#putting-it-all-together">Putting It All Together</a></li>
        <li><a href="LangImpl08.html#full-code-listing">Full Code Listing</a></li>
    </ul>
    </li>
    <li><a href="LangImpl09.html">9. Adding Debug Information</a>
    <ul>
        <li><a href="LangImpl09.html#chapter-9-introduction">Chapter 9 Introduction</a></li>
        <li><a href="LangImpl09.html#why-is-this-a-hard-problem">Why is this a hard problem?</a></li>
        <li><a href="LangImpl09.html#ahead-of-time-compilation-mode">Ahead-of-Time Compilation Mode</a></li>
        <li><a href="LangImpl09.html#compile-unit">Compile Unit</a></li>
        <li><a href="LangImpl09.html#dwarf-emission-setup">DWARF Emission Setup</a></li>
        <li><a href="LangImpl09.html#functions">Functions</a></li>
        <li><a href="LangImpl09.html#source-locations">Source Locations</a></li>
        <li><a href="LangImpl09.html#variables">Variables</a></li>
        <li><a href="LangImpl09.html#full-code-listing">Full Code Listing</a></li>
    </ul>
    </li>
    <li><a href="LangImpl10.html">10. Conclusion and other useful LLVM tidbits</a>
    <ul>
        <li><a href="LangImpl10.html#tutorial-conclusion">Tutorial Conclusion</a></li>
        <li><a href="LangImpl10.html#properties-of-the-llvm-ir">Properties of the LLVM IR</a>
        <ul>
            <li><a href="LangImpl10.html#target-independence">Target Independence</a></li>
            <li><a href="LangImpl10.html#safety-guarantees">Safety Guarantees</a></li>
            <li><a href="LangImpl10.html#language-specific-optimizations">Language-Specific Optimizations</a></li>
        </ul>
        </li>
        <li><a href="LangImpl10.html#tips-and-tricks">Tips and Tricks</a>
        <ul>
            <li><a href="LangImpl10.html#implementing-portable-offsetof-sizeof">Implementing portable offsetof/sizeof</a></li>
            <li><a href="LangImpl10.html#garbage-collected-stack-frames">Garbage Collected Stack Frames</a></li>
        </ul>
        </li>
    </ul>
    </li>
</ul>
</body>
</html>
